package com.mycompany.prog;

import java.io.Serializable;
import javax.persistence.*;

@Entity
@Table(name = "CARS")
public class Car implements Serializable {

    @Id
    private long id;
    String model;

    public Car() {
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public Car(long id, String model) {
        this.id = id;
        this.model = model;
    }

    @Override
    public String toString() {
        return "Car{" + "id=" + id + ", model=" + model + '}';
    }
}
